<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="workorder/order/include::header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="VivaTimeline">
						<dl>
							<dd class="pos-left clearfix" th:unless="${workOrder} == null">
								<div class="circ"></div>
								<div class="time" th:text="${workOrder.createTime} == null? null:${#dates.format(workOrder.createTime,'yyyy-MM-dd HH:mm:ss')}"></div>
								<div class="events">
									<div class="events-header" th:text="${workOrder.realname}"></div>
									<div class="events-body">
										<div class="row">
											<div class="col-md-4 pull-left" th:unless="${workOrder.pic} == null" th:each="item:${#strings.setSplit(workOrder.pic,',')}">
												<a target="_blank" th:href="${item}">
													<img class="events-object img-responsive img-rounded" style="width: 50%;height: auto" th:attr="src= ${item}"/>
												</a>
											</div>
											<div class="events-desc" th:text="${workOrder.contents}"></div>
										</div>
									</div>
									<div class="events-footer"></div>
								</div>
							</dd>
							<dd th:class="${iterStat.index % 2} == 0? 'pos-right clearfix':'pos-left clearfix'" th:each="item,iterStat:${workComments}">
								<div class="circ"></div>
								<div class="time" style="width: 25%" th:text="${item.createTime} == null? null:${#dates.format(item.createTime,'yyyy-MM-dd HH:mm:ss')}"></div>
								<div class="events">
									<div class="events-header" th:text="${item.mname} == null? ${item.kefuName}:${item.mname}"></div>
									<div class="events-body">
										<div class="row">
											<div th:unless="${item.pic} == null">
												<div class="col-md-4 pull-left"  th:each="ii:${#strings.setSplit(item.pic,',')}">
													<img class="events-object img-responsive img-rounded" style="width: 50%;height: auto" th:attr="src= ${ii}"/>
												</div>
											</div>
											<div class="events-desc" th:text="${item.remark}"></div>
										</div>
									</div>
									<div class="events-footer">
									</div>
								</div>
							</dd>
						</dl>
					</div>
					<div class="ibox-content" shiro:hasPermission="sales:order:saveReply">
						<form class="form-horizontal m-t" id="signupForm">
							<input type="hidden" name="workId" id="workId" th:value="${workOrder.id}">
							<div class="form-group">
								<label class="col-sm-3 control-label">上传图片:</label>
								<div class="col-sm-7">
									<input id="pic" name="pic" class="form-control" type="text">
								</div>
								<div class="col-sm-2">
									<button type="button" onclick="batchUploadImg('pic')" class="btn btn-primary"><i class="fa fa-check"></i>选择图片</button>
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">回复内容:</label>
								<div class="col-sm-8">
									<textarea id="remark" name="remark" class="form-control" placeholder="200字符以内"></textarea>
								</div>
							</div>

							<div class="form-group text-center">
								<div class="col-sm-8 col-sm-offset-2">
									<button type="submit" class="btn btn-primary"><i class="fa fa-check"></i>回复</button>
									<div shiro:hasPermission="sales:order:forward" class="btn btn-success" onclick="forwardCaiWu()"><i class="fa fa-mail-forward"></i>转财务处理</div>
									<div shiro:hasPermission="sales:order:close" class="btn btn-warning" onclick="closeWorkOrder()"><i class="fa fa-ban"></i>关闭(驳回)</div>
									<div class="btn btn-danger" onclick="closeDow()"><i class="fa fa-remove"></i> 关闭</div>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div th:include="workorder/order/include::footer"></div>
	<script type="text/javascript" src="/js/appjs/workorder/order/reply.js">
	</script>
	<script type="text/javascript">
		function closeDow() {
			var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
			parent.layer.close(index);
		}
	</script>
</body>

</html>
